package com.m.crm.web;

import com.m.crm.dto.BootStrapTableResult;
import com.m.crm.entity.Role;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yugoh on 2017/5/23.
 */
@RestController
@RequestMapping("/roles")
public class RoleController {
    /**
     * 获取角色列表
     *
     * @param role
     * @param offset
     * @param limit
     * @return
     */
    @RequestMapping(method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
    public BootStrapTableResult<Role> list(Role role, Integer offset, Integer limit){
        // TODO
        return null;
    }

    /**
     * 更新角色信息
     *
     * @param role
     * @return
     */
    @RequestMapping(value = "/{roleId}", method = RequestMethod.PUT, produces = {"application/json;charset=UTF-8"})
    public Role update(Role role) {
        // TODO
        return null;
    }

    /**
     * 添加一个角色
     *
     * @param role
     * @return
     */
    @RequestMapping(method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    public Role add(Role role) {
        // TODO
        return null;
    }

    /**
     * 查询一个角色
     *
     * @return
     */
    @RequestMapping(value = "/{roleId}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
    public Role getRole() {
        // TODO
        return null;
    }
}
